﻿/**
 * @author Administrator
 */

/**
 * 显示发表主题表格
 */
function displayAppearTable(){
	var myTable = document.getElementById("appearTable");
	myTable.style.display = "inline";
	return false;
}

/**
 * 隐藏发表主题表格
 */
function hiddAppearTable(){
	var myTable = document.getElementById("appearTable");
	myTable.style.display = "none";
	return false;
}

/**
 * 验证发表主题内容是否为空
 * @param {Object} title
 * @param {Object} content
 */
function checkTitleAndContent(title, content){
	if(document.getElementById(title).value == ""){
		alert("标题不能为空！");
		return false;
	}
	if(document.getElementById(content).value == ""){
		alert("内容不能为空！");
		return false;
	}
	return true;
}

/**
 * 验证回帖内容是否为空！
 * @param {Object} target
 */
function checkAppear(target){
	if(document.getElementById(target).value == ""){
		alert("回帖内容不许为空！");
		return false;
	}
	return true;
}

/**
 * 隐藏或显示创建分区表格
 * @param (Object) target
 */
function hidCreateAreaTable(target){
	if(target == "display"){
		document.getElementById("createAreaTable").style.display = "inline";
	} else {
		document.getElementById("createAreaTable").style.display = "none";
	}
	return false;
}

/**
 * 检查创建分区名字是否为空
 * @param {Object} target
 */
function checkCreateArea(target){
	if(document.getElementById(target).value == ""){
		alert("分区名字不能为空！");
		return false;
	}
	return true;
}
